package com.emm.yixun.mobile.ui.calculateprice;

import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

import me.imid.swipebacklayout.lib.SwipeBackLayout;
import me.imid.swipebacklayout.lib.app.SwipeBackActivity;
import android.content.Context;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.emm.yixun.mobile.R;
import com.emm.yixun.mobile.application.EmmApplication;
import com.emm.yixun.mobile.base.BaseActivity;
import com.emm.yixun.mobile.model.ListInfo;
import com.eroad.product.tools.MyListView;

/**
 * 
 * <p>
 * <b>Title：</b>首付选择
 * </p>
 * <p>
 * <b>Description：</b>
 * </p>
 * 
 * @author tangxin
 * @date 2016年12月6日 下午4:11:30
 */
public class FirstPayActivity extends SwipeBackActivity {
	private static final String TAG = "FirstPayActivity";

	/** 1首付 2贷款利率 */
	private String TYPE = "1";

	/** title */
	TextView title_main;

	/** back按钮 */
	ImageView back_btn;

	/** 首付比例 */
	EditText housesSumPrice_view;

	MyListView listview;

	/** 总价 */
	private String totalAmount_;

	/** 首付 */
	LinearLayout first_pay_linear;

	/** 贷款比例 */
	LinearLayout linea_best_linear;

	/** 商贷利率 */
	EditText businessLoanRate_f_view;

	/** 公积金利率 */
	EditText fundLoanRate_f_view;

	TextView pr_name;

	LinearLayout businessLoanRate_f_ll, fundLoanRate_f_ll;

	/** 基础商业利率 */
	EditText businessLoan_ed;

	/** 商业倍率 */
	EditText businessLoan_Rate;

	/** 总览利率 */
	// TextView businessLoanRate_textview;

	/** 公积金 */
	// TextView fundLoanRate_textview;

	/** 确定 */
	Button sure_btn;
	/** 1自定义输入 2选择的名称 */
	String writetype = "1";

	TextView textview1;
	
	/** 侧滑关闭框架 */
	private SwipeBackLayout mSwipeBackLayout;

	@Override
	protected void onResume() {
		BaseActivity.activity = this;
		super.onResume();
	}

	@Override
	protected void onCreate(Bundle arg0) {
		super.onCreate(arg0);
		setContentView(R.layout.first_pay_activity);
		
		SetSwipeBackLayout(mSwipeBackLayout);
		
		BaseActivity.activity = this;

		totalAmount_ = getIntent().getStringExtra("totalAmount_");
		Log.v(TAG, "totalAmount_:" + totalAmount_);
		if ("".equals(totalAmount_) || "null".equals(totalAmount_) || null == totalAmount_) {
			totalAmount_ = "0";
		}

		TYPE = getIntent().getStringExtra("TYPE");

		initView();
		
		SetRelativiLayoutPadding(R.id.main_head_top_rela);
		
		initBtn();
	}

	/**
	 * 
	 * <p>
	 * <b>Title：</b> 初始化view
	 * </p>
	 * <p>
	 * <b>Description：</b>
	 * </p>
	 * 
	 * @author tangxin
	 * @date 2016年12月7日 下午2:15:41
	 */
	private void initView() {
		title_main = (TextView) findViewById(R.id.title_main);
		back_btn = (ImageView) findViewById(R.id.back_btn);
		housesSumPrice_view = (EditText) findViewById(R.id.housesSumPrice_view);
		listview = (MyListView) findViewById(R.id.list_first_pay);
		first_pay_linear = (LinearLayout) findViewById(R.id.first_pay_linear);
		linea_best_linear = (LinearLayout) findViewById(R.id.linea_best_linear);
		businessLoanRate_f_view = (EditText) findViewById(R.id.businessLoanRate_f_view);
		fundLoanRate_f_view = (EditText) findViewById(R.id.fundLoanRate_f_view);
		pr_name = (TextView) findViewById(R.id.pr_name);
		businessLoanRate_f_ll = (LinearLayout) findViewById(R.id.businessLoanRate_f_ll);
		fundLoanRate_f_ll = (LinearLayout) findViewById(R.id.fundLoanRate_f_ll);
		businessLoan_ed = (EditText) findViewById(R.id.businessLoan_ed);
		businessLoan_Rate = (EditText) findViewById(R.id.businessLoan_Rate);
		// businessLoanRate_textview = (TextView)
		// findViewById(R.id.businessLoanRate_textview);
		// fundLoanRate_textview = (TextView)
		// findViewById(R.id.fundLoanRate_textview);
		sure_btn = (Button) findViewById(R.id.sure_btn_firstpay);
		textview1 = (TextView) findViewById(R.id.textview1);
		if ("1".equals(TYPE)) {// 首付
			title_main.setText(getString(R.string.ui_ppo_1));
			sure_btn.setVisibility(View.GONE);
		} else if ("2".equals(TYPE)) {
			title_main.setText(getString(R.string.ui_ppo_2));
		}

		if ("1".equals(TYPE)) {// 首付
			SetDeta();
			first_pay_linear.setVisibility(View.VISIBLE);
			linea_best_linear.setVisibility(View.GONE);
			pr_name.setText("或者选择常用比例");
		} else if ("2".equals(TYPE)) {
			SetDeta2();
			first_pay_linear.setVisibility(View.GONE);
			linea_best_linear.setVisibility(View.VISIBLE);
			pr_name.setText("或者选择常用利率");
		}

		if (CalculatePriceActivity.loantype_ == 1) {
			fundLoanRate_f_ll.setVisibility(View.VISIBLE);
			businessLoanRate_f_ll.setVisibility(View.GONE);
		} else if (CalculatePriceActivity.loantype_ == 2) {
			businessLoanRate_f_ll.setVisibility(View.VISIBLE);
			fundLoanRate_f_ll.setVisibility(View.GONE);
		} else if (CalculatePriceActivity.loantype_ == 3) {
			businessLoanRate_f_ll.setVisibility(View.VISIBLE);
			fundLoanRate_f_ll.setVisibility(View.VISIBLE);
		}

	}

	/**
	 * 
	 * <p>
	 * <b>Title：</b> 在输入完成之后校验输入格式
	 * </p>
	 * <p>
	 * <b>Description：</b>
	 * </p>
	 * 
	 * @param ed
	 * @author tangxin
	 * @date 2016年12月7日 下午2:15:52
	 */
	private void setdate(final EditText ed) {
		ed.setOnFocusChangeListener(new android.view.View.OnFocusChangeListener() {
			@Override
			public void onFocusChange(View v, boolean hasFocus) {
				if (hasFocus) {
					// 获得焦点
				} else {
					// 失去焦点
					List<String> list = SetList(ed.getText().toString().trim(), ".");
					if (null == list || list.size() <= 0) {
						ed.setText("0.00");
					} else if (list.size() == 1) {
						ed.setText(EmmApplication.drop3(list.get(0) + ".00"));
					} else {
						ed.setText(EmmApplication.drop3(ed.getText().toString().trim()));
					}
				}
			}

		});
	}

	/**
	 * 
	 * <p>
	 * <b>Title：</b> 初始化监听事件
	 * </p>
	 * <p>
	 * <b>Description：</b>
	 * </p>
	 * 
	 * @author tangxin
	 * @date 2016年12月7日 下午2:16:14
	 */
	private void initBtn() {
		setdate(businessLoan_ed);
		businessLoan_ed.addTextChangedListener(new TextWatcher() {
			@Override
			public void onTextChanged(CharSequence s, int start, int before, int count) {
			}

			@Override
			public void beforeTextChanged(CharSequence s, int start, int count, int after) {
			}

			@Override
			public void afterTextChanged(Editable s) {
				String str = s.toString().trim();
				if (EmmApplication.isNull(str)) {
					if (s.toString().indexOf(".") >= 0) {
						if (s.toString().indexOf(".", s.toString().indexOf(".") + 1) > 0) { // 已重复输入小数点
							Log.v(TAG, "商业利率 已重复输入 小数点");
							String content = businessLoan_ed.getText().toString();
							businessLoan_ed.setText(EmmApplication.drop3(""
									+ (Double.valueOf(EmmApplication.replace(".", "", content)).doubleValue() / 100)));
							businessLoan_ed.setSelection(businessLoan_ed.getText().toString().trim().length());
							return;
						}
					}
					String content = businessLoan_ed.getText().toString();
					if (Double.valueOf(content).doubleValue() > 999.99) {
						Log.v(TAG, "商业利率 数字长度大于999.99，此次编辑无效");
						businessLoan_ed.setText("999.99");
					}

					List<String> list = SetList(businessLoan_ed.getText().toString().trim(), ".");
					if (null == list || list.size() <= 0) {
					} else if (list.size() == 1) {
					} else {
						if (list.get(1).length() > 2) {
							businessLoan_ed.setText(EmmApplication.drop3(businessLoan_ed.getText().toString().substring(0, str.length() - 1)));
							businessLoan_ed.setSelection(businessLoan_ed.getText().toString().length());
						}
					}
					String rate = "1.00";
					if (EmmApplication.isNull(businessLoan_Rate.getText().toString().trim())) {
						rate = businessLoan_Rate.getText().toString().trim();
					}
					businessLoanRate_f_view.setText(EmmApplication.drop3(""
							+ (Double.valueOf(rate).doubleValue() * Double.valueOf(businessLoan_ed.getText().toString().trim())
									.doubleValue())));
				}
			}
		});

		setdate(businessLoan_Rate);
		businessLoan_Rate.addTextChangedListener(new TextWatcher() {
			@Override
			public void onTextChanged(CharSequence s, int start, int before, int count) {
			}

			@Override
			public void beforeTextChanged(CharSequence s, int start, int count, int after) {
			}

			@Override
			public void afterTextChanged(Editable s) {
				String str = s.toString().trim();
				if (EmmApplication.isNull(str)) {
					if (s.toString().indexOf(".") >= 0) {
						if (s.toString().indexOf(".", s.toString().indexOf(".") + 1) > 0) { // 已重复输入小数点
							Log.v(TAG, "倍率 已重复输入 小数点");
							String content = businessLoan_Rate.getText().toString();
							businessLoan_Rate.setText(EmmApplication.drop3(""
									+ (Double.valueOf(EmmApplication.replace(".", "", content)).doubleValue() / 100)));
							businessLoan_Rate.setSelection(businessLoan_Rate.getText().toString().trim().length());
							return;
						}
					}
					String content = businessLoan_Rate.getText().toString();
					if (Double.valueOf(content).doubleValue() > 999.99) {
						Log.v(TAG, "商业利率 数字长度大于999.99，此次编辑无效");
						businessLoan_Rate.setText("999.99");
					}
					List<String> list = SetList(businessLoan_Rate.getText().toString().trim(), ".");
					if (null == list || list.size() <= 0) {
					} else if (list.size() == 1) {
					} else {
						if (list.get(1).length() > 2) {
							businessLoan_Rate.setText(EmmApplication.drop3(businessLoan_Rate.getText().toString()
									.substring(0, str.length() - 1)));
							businessLoan_Rate.setSelection(businessLoan_Rate.getText().toString().length());
						}
					}
					if (EmmApplication.isNull(businessLoan_ed.getText().toString().trim())) {
						Log.v(TAG, "商业利率不为空");
						businessLoanRate_f_view.setText(EmmApplication.drop3(""
								+ (Double.valueOf(businessLoan_Rate.getText().toString().trim()).doubleValue() * Double.valueOf(
										businessLoan_ed.getText().toString().trim()).doubleValue())));
					}
					if (EmmApplication.isNull(fundLoanRate_f_view_number)) {
						fundLoanRate_f_view.setText(EmmApplication.drop3(""
								+ (Double.valueOf(businessLoan_Rate.getText().toString().trim()).doubleValue() * Double.valueOf(
										fundLoanRate_f_view_number).doubleValue())));
					}
				}
			}
		});

		back_btn.setVisibility(View.VISIBLE);
		back_btn.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				finish();
			}
		});

		housesSumPrice_view.addTextChangedListener(new TextWatcher() {
			@Override
			public void onTextChanged(CharSequence s, int start, int before, int count) {
			}

			@Override
			public void beforeTextChanged(CharSequence s, int start, int count, int after) {
			}

			@Override
			public void afterTextChanged(Editable s) {
				if (null != s && s.length() > 0) {
					String str = s.toString().trim();
					if (Double.valueOf(str).doubleValue() > Double.valueOf(totalAmount_).doubleValue()) {
						housesSumPrice_view.setText(totalAmount_);
						EmmApplication.Ts("不能超过总价");
					}
				}
			}
		});
		setdate(fundLoanRate_f_view);
		fundLoanRate_f_view.addTextChangedListener(new TextWatcher() {
			@Override
			public void onTextChanged(CharSequence s, int start, int before, int count) {
			}

			@Override
			public void beforeTextChanged(CharSequence s, int start, int count, int after) {
			}

			@Override
			public void afterTextChanged(Editable s) {
				if (null != s && s.length() > 0) {
					String str = fundLoanRate_f_view.getText().toString().trim();
					if (Double.valueOf(str).doubleValue() > 999.99) {
						Log.v(TAG, "商业利率 数字长度大于999.99，此次编辑无效");
						fundLoanRate_f_view.setText("999.99");
					} else {
						List<String> list = SetList(fundLoanRate_f_view.getText().toString().trim(), ".");
						if (null == list || list.size() <= 0) {
						} else if (list.size() == 1) {
						} else {
							if (list.get(1).length() > 2) {
								fundLoanRate_f_view.setText(EmmApplication.drop3(fundLoanRate_f_view.getText().toString()
										.substring(0, str.length() - 1)));
								fundLoanRate_f_view.setSelection(fundLoanRate_f_view.getText().toString().length());
							}
						}
					}
				}
			}
		});

		housesSumPrice_view.setOnEditorActionListener(new TextView.OnEditorActionListener() {

			@Override
			public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
				/* 判断是否是“DONE/完成”键 */
				if (actionId == EditorInfo.IME_ACTION_DONE) {
					/* 隐藏软键盘 */
					InputMethodManager imm = (InputMethodManager) v.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
					if (imm.isActive()) {
						imm.hideSoftInputFromWindow(v.getApplicationWindowToken(), 0);
					}
					Log.v(TAG, "完成");
					CalculatePriceActivity.FirstPrice = housesSumPrice_view.getText().toString().trim();
					finish();
					return true;
				}
				return false;
			}
		});

		sure_btn.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				CalculatePriceActivity.fundLoanRate_price = EmmApplication.removed(businessLoanRate_f_view.getText().toString());
				CalculatePriceActivity.businessLoanRate_price = EmmApplication.removed(fundLoanRate_f_view.getText().toString());
				int type = 0;
				for (int i = 0; i < listfirstpay.size(); i++) {
					if ((listfirstpay.get(i).getNumber()).equals(businessLoan_ed.getText().toString().trim())) {
						if ((listfirstpay.get(i).getNumber2()).equals(CalculatePriceActivity.fundLoanRate_price)) {
						} else {
							type++;
						}
					} else {
						type++;
					}
				}
				if (type == listfirstpay.size()) {
					CalculatePriceActivity.loanRate_name = "自定义输入";
				} else {
					if (selectposition >= 0) {
						CalculatePriceActivity.loanRate_name = listfirstpay.get(selectposition).getName();
					}
				}
				CalculatePriceActivity.Rate = businessLoan_Rate.getText().toString();
				finish();
			}
		});

	}

	/**
	 * 
	 * <p>
	 * <b>Title：</b> 分割方法
	 * </p>
	 * <p>
	 * <b>Description：</b> 将一组字符串以 某个 字符串 为分割点，转成list
	 * </p>
	 * 
	 * @param str
	 *            需要分割的string
	 * @param type
	 *            分割依据
	 * @return
	 * @author tangxin
	 * @date 2016年12月7日 下午2:17:44
	 */
	private List<String> SetList(String str, String type) {
		List<String> b = new ArrayList<String>();
		StringTokenizer st = new StringTokenizer(str, type);
		while (st.hasMoreTokens()) {
			b.add(st.nextToken());
		}
		return b;
	}

	/**
	 * 
	 * <p>
	 * <b>Title：</b> 设置默认数据
	 * </p>
	 * <p>
	 * <b>Description：</b>
	 * </p>
	 * 
	 * @author tangxin
	 * @date 2016年12月7日 下午2:18:51
	 */
	private void SetDeta2() {
		ListInfo l0 = new ListInfo();
		l0.setName("15年8月26利率上限（1.1倍）");
		l0.setNumber("5.15");
		l0.setNumber2("3.25");
		l0.setRate("1.10");
		listfirstpay.add(l0);

		ListInfo l1 = new ListInfo();
		l1.setName("15年8月26利率下限（85折）");
		l1.setNumber("5.15");
		l1.setNumber2("3.25");
		l1.setRate("0.85");
		listfirstpay.add(l1);

		ListInfo l2 = new ListInfo();
		l2.setName("15年8月26利率下限（7折）");
		l2.setNumber("5.15");
		l2.setNumber2("3.25");
		l2.setRate("0.70");
		listfirstpay.add(l2);

		ListInfo l3 = new ListInfo();
		l3.setName("15年8月26基准利率");
		l3.setNumber("5.15");
		l3.setNumber2("3.25");
		l3.setRate("1.00");
		listfirstpay.add(l3);

		ListInfo l4 = new ListInfo();
		l4.setName("15年6月28利率上限（1.1倍）");
		l4.setNumber("5.40");
		l4.setNumber2("3.50");
		l4.setRate("1.10");
		listfirstpay.add(l4);

		ListInfo l5 = new ListInfo();
		l5.setName("15年6月28利率下限（85折）");
		l5.setNumber("5.40");
		l5.setNumber2("3.50");
		l5.setRate("0.85");
		listfirstpay.add(l5);

		ListInfo l6 = new ListInfo();
		l6.setName("15年6月28利率下限（7折）");
		l6.setNumber("5.40");
		l6.setNumber2("3.50");
		l6.setRate("0.70");
		listfirstpay.add(l6);

		ListInfo l7 = new ListInfo();
		l7.setName("15年6月28基准利率");
		l7.setNumber("5.40");
		l7.setNumber2("3.50");
		l7.setRate("1.00");
		listfirstpay.add(l7);

		ListInfo l8 = new ListInfo();
		l8.setName("15年5月11利率上限（1.1倍）");
		l8.setNumber("5.56");
		l8.setNumber2("3.75");
		l8.setRate("1.10");
		listfirstpay.add(l8);

		ListInfo l9 = new ListInfo();
		l9.setName("15年5月11利率上下限（85折）");
		l9.setNumber("5.56");
		l9.setNumber2("3.75");
		l9.setRate("0.85");
		listfirstpay.add(l9);

		ListInfo l10 = new ListInfo();
		l10.setName("15年5月11利率下限（7折）");
		l10.setNumber("5.56");
		l10.setNumber2("3.75");
		l10.setRate("0.70");
		listfirstpay.add(l10);

		ListInfo l11 = new ListInfo();
		l11.setName("15年5月11基准利率");
		l11.setNumber("5.56");
		l11.setNumber2("3.75");
		l11.setRate("1.00");
		listfirstpay.add(l11);

		ListInfo l12 = new ListInfo();
		l12.setName("15年3月1利率上限（1.1倍）");
		l12.setNumber("5.90");
		l12.setNumber2("4.00");
		l12.setRate("1.10");
		listfirstpay.add(l12);

		ListInfo l13 = new ListInfo();
		l13.setName("15年3月1利率上下限（85折）");
		l13.setNumber("5.90");
		l13.setNumber2("4.00");
		l13.setRate("0.85");
		listfirstpay.add(l13);

		ListInfo l14 = new ListInfo();
		l14.setName("15年3月1利率下限（7折）");
		l14.setNumber("5.90");
		l14.setNumber2("4.00");
		l14.setRate("0.70");
		listfirstpay.add(l14);

		ListInfo l15 = new ListInfo();
		l15.setName("15年3月1基准利率");
		l15.setNumber("5.90");
		l15.setNumber2("4.00");
		l15.setRate("1.00");
		listfirstpay.add(l15);

		adapter = new FisrtPayAdapter();
		listview.setAdapter(adapter);

		businessLoan_ed.setText("5.15");
		businessLoan_Rate.setText("1.00");
		fundLoanRate_f_view.setText("3.25");
		fundLoanRate_f_view_number = "3.25";
		businessLoanRate_f_view.setText("5.15");
	}

	List<ListInfo> listfirstpay = new ArrayList<ListInfo>();

	private int selectposition = 3;

	/**
	 * 
	 * <p>
	 * <b>Title：</b> 设置首付快捷选择金额(按成数)
	 * </p>
	 * <p>
	 * <b>Description：</b>
	 * </p>
	 * 
	 * @author tangxin
	 * @date 2016年12月7日 下午2:19:13
	 */
	private void SetDeta() {
		ListInfo l0 = new ListInfo();
		l0.setName("1成");
		listfirstpay.add(l0);

		ListInfo l1 = new ListInfo();
		l1.setName("2成");
		listfirstpay.add(l1);

		ListInfo l2 = new ListInfo();
		l2.setName("2.5成");
		listfirstpay.add(l2);

		ListInfo l3 = new ListInfo();
		l3.setName("3成");
		listfirstpay.add(l3);

		ListInfo l4 = new ListInfo();
		l4.setName("4成");
		listfirstpay.add(l4);

		ListInfo l5 = new ListInfo();
		l5.setName("5成");
		listfirstpay.add(l5);

		ListInfo l6 = new ListInfo();
		l6.setName("6成");
		listfirstpay.add(l6);

		ListInfo l7 = new ListInfo();
		l7.setName("7成");
		listfirstpay.add(l7);

		ListInfo l8 = new ListInfo();
		l8.setName("8成");
		listfirstpay.add(l8);

		ListInfo l9 = new ListInfo();
		l9.setName("9成");
		listfirstpay.add(l9);

		adapter = new FisrtPayAdapter();
		listview.setAdapter(adapter);
	}

	FisrtPayAdapter adapter;

	/**
	 * 
	 * <p>
	 * <b>Title：</b> 条件list适配器
	 * </p>
	 * <p>
	 * <b>Description：</b>
	 * </p>
	 * 
	 * @author tangxin
	 * @date 2016年12月7日 下午2:20:04
	 */
	class FisrtPayAdapter extends BaseAdapter {

		@Override
		public int getCount() {
			return listfirstpay.size();
		}

		public void SetPositiong(int position_) {
			for (int i = 0; i < listfirstpay.size(); i++) {
				listfirstpay.get(i).setSelect(false);
			}
			if (position_ != -1) {
				listfirstpay.get(position_).setSelect(true);
			}
			notifyDataSetChanged();
		}

		@Override
		public Object getItem(int position) {
			return listfirstpay.get(position);
		}

		@Override
		public long getItemId(int position) {
			return position;
		}

		@Override
		public View getView(final int position, View convertView, ViewGroup parent) {
			ViewHoudler_ v = null;
			if (convertView == null) {
				convertView = LayoutInflater.from(FirstPayActivity.this).inflate(R.layout.first_pay_item, null);
				v = new ViewHoudler_();
				v.content_ = (TextView) convertView.findViewById(R.id.content_);
				v.select_icon = (ImageView) convertView.findViewById(R.id.select_icon);
				convertView.setTag(v);
			} else {
				v = (ViewHoudler_) convertView.getTag();
			}
			if (listfirstpay.get(position).isSelect()) {
				v.select_icon.setImageResource(R.drawable.ico_selt);
			} else {
				v.select_icon.setImageResource(R.drawable.ico_delt_no);
			}
			v.content_.setText(listfirstpay.get(position).getName());
			convertView.setOnClickListener(new OnClickListener() {
				@Override
				public void onClick(View v) {
					selectposition = position;
					adapter.SetPositiong(position);
					if ("1".equals(TYPE)) {// 首付
						CalculatePriceActivity.FirstPrice = ""
								+ EmmApplication.drop2(""
										+ (Double.valueOf(totalAmount_).doubleValue()
												* (Double.valueOf(EmmApplication.removeFirst(listfirstpay.get(position).getName()))
														.doubleValue()) / 10));
						finish();
					} else {
						String str = listfirstpay.get(position).getNumber2();
						fundLoanRate_f_view_number = str;
						businessLoan_ed.setText(listfirstpay.get(position).getNumber());
						businessLoan_Rate.setText(listfirstpay.get(position).getRate());
					}
				}
			});
			return convertView;
		}
	}

	String fundLoanRate_f_view_number = "";

	public static class ViewHoudler_ {
		TextView content_;
		ImageView select_icon;
	}

}
